<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
    Menu
</label>
<aside class="phpdocumentor-column -four phpdocumentor-sidebar">
    {% set menu = menu() %}
    {% if menu %}
    <section class="phpdocumentor-sidebar__category">
        <h2 class="phpdocumentor-sidebar__category-header"><a href="{{ menu.path }}">{{ menu.label }}</a></h2>
        {% for menuItem in menu.items %}
            {{ include('menu.html.twig', {menuItem: menuItem}, with_context = false) }}
        {% endfor %}
    </section>
    {% endif %}

    <section class="phpdocumentor-sidebar__category">
        <h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
        {% if usesNamespaces or not usesPackages %}
            {% if project.namespace.functions is not empty or project.namespace.constants is not empty or project.namespace.classes is not empty or project.namespace.interfaces is not empty or project.namespace.traits is not empty %}
            <h3 class="phpdocumentor-sidebar__root-namespace">{{ project.namespace|route('Global') }}</h3>
            {% endif %}
            {% for namespace in project.namespace.children %}
                <h4 class="phpdocumentor-sidebar__root-namespace">{{ namespace|route('class:short') }}</h4>
                <ul class="phpdocumentor-list">
                    {% for child in namespace.children %}
                        <li>{{ child|route('class:short') }}</li>
                    {% endfor %}
                </ul>
            {% endfor %}
        {% endif %}
    </section>

    {% if usesPackages %}
    <section class="phpdocumentor-sidebar__category">
        <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
        {% for package in project.package.children %}
            <h3 class="phpdocumentor-sidebar__root-package">{{ package|route('class:short') }}</h3>
            {% if package.children is not empty %}
            <ul class="phpdocumentor-list">
                {% for child in package.children %}
                    <li>{{ child|route('class:short') }}</li>
                {% endfor %}
            </ul>
            {% endif %}
        {% endfor %}
    </section>
    {% endif %}

    <section class="phpdocumentor-sidebar__category">
        <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
        {% if project.settings.custom['graphs.enabled'] %}
        <h3 class="phpdocumentor-sidebar__root-package"><a href="graphs/classes.html">Class Diagram</a></h3>
        {% endif %}
        <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
        <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
        <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
    </section>

    <section class="phpdocumentor-sidebar__category">
        <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
        <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
    </section>
</aside>
